using System;
using System.Web.UI;
using System.Collections;

namespace AresControls
{
	public class HControl : Control
	{
		private string m_Width = "50", m_DataSrc = "", m_GridId = "", m_AlertRequiredString = "", m_AlertInvalidString = "", m_Style = "", 
			m_InvokeOnChange = "", m_InvokeOnBeforeDeactivate = "", m_InvokeOnActivate = "", m_InvokeOnChangeLine = "", m_DefaultValue = null, 
			m_ReadOnlyColor = "#DEDEDE;";
		private ArrayList m_FillFunction = null;
		private bool m_ReadOnly = false, m_GridControl = false, m_Required = false, m_ToolTip = true;

		public HControl()
		{
		}

		public String renderInvokeOnChange()
		{
			return " InvokeOnChange=\"" + InvokeOnChange + "\" ";
		}

		public String renderInvokeOnChangeLine()
		{
			return " InvokeOnChangeLine=\"" + InvokeOnChangeLine + "\" ";
		}

		public String renderInvokeOnActivate()
		{
			return " InvokeOnActivate=\"" + InvokeOnActivate + "\" ";
		}

		public String renderInvokeOnBeforeDeactivate()
		{
			return " InvokeOnBeforeDeactivate=\"" + InvokeOnBeforeDeactivate + "\" ";
		}

		public String renderControlReadOnly()
		{
			return " ControlReadOnly=\"true\" readonly tabindex=-1 ";
		}

		public String renderGridControl()
		{
			return " GridControl=\"true\" ";
		}

		public String renderGridID()
		{
			return " GridId=\"" + GridId + "\" ";
		}

		public String renderDefaultValue()
		{
			return " DefaultValue=\""+DefaultValue+"\" ";
		}

		public String renderRequired()
		{
			return " Required=\"true\" ";
		}

		public String renderAlertRequiredString()
		{
			return " AlertRequiredString=\"" + AlertRequiredString + "\" ";
		}

		public String renderAlertInvalidString()
		{
			return " AlertInvalidString=\"" + m_AlertInvalidString + "\" ";
		}

		public String renderToolTip()
		{
			return " ToolTip=\"true\" ";
		}

		public string ReadOnlyColor
		{
			get { return m_ReadOnlyColor; }
			set { m_ReadOnlyColor = value; }
		}

		public string Style
		{
			get { return m_Style; }
			set { m_Style = value; }
		}

		public bool ToolTip
		{
			get { return m_ToolTip; }
			set { m_ToolTip = value; }
		}

		public string AlertRequiredString
		{
			get { return m_AlertRequiredString; }
			set { m_AlertRequiredString = value; }
		}

		public string AlertInvalidString
		{
			get { return m_AlertInvalidString; }
			set { m_AlertInvalidString = value; }
		}

		public bool Required
		{
			get { return m_Required; }
			set { m_Required = value; }
		}

		public string GridId
		{
			get { return m_GridId; }
			set { m_GridId = value; }
		}

		public bool GridControl
		{
			get { return m_GridControl; }
			set { m_GridControl = value; }
		}

		public bool ReadOnly
		{
			get { return m_ReadOnly; }
			set { m_ReadOnly = value; }
		}

		public string DataSrc
		{
			get { return m_DataSrc; }
			set { m_DataSrc = value; }
		}

		public ArrayList FillFunction
		{
			get { return m_FillFunction; }
			set { m_FillFunction = value; }
		}

		public string Width
		{
			get { return m_Width; }
			set { m_Width = value; }
		}

		public string InvokeOnChange
		{
			get { return m_InvokeOnChange; }
			set { m_InvokeOnChange = value; }
		}

		public string InvokeOnBeforeDeactivate
		{
			get { return m_InvokeOnBeforeDeactivate; }
			set { m_InvokeOnBeforeDeactivate = value; }
		}

		public string InvokeOnActivate
		{
			get { return m_InvokeOnActivate; }
			set { m_InvokeOnActivate = value; }
		}

		public string InvokeOnChangeLine
		{
			get { return m_InvokeOnChangeLine; }
			set { m_InvokeOnChangeLine = value; }
		}

		public string DefaultValue
		{
			get { return m_DefaultValue; }
			set { m_DefaultValue = value; }
		}

	}
}
